package com.ruoyi.financial.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.financial.domain.TCwCheckBatchDetail;
import com.ruoyi.financial.mapper.TCwCheckBatchDetailMapper;
import com.ruoyi.financial.service.ITCwCheckBatchDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 对账批次明细（保存对账结果明细的）Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-22
 */
@Service
public class TCwCheckBatchDetailServiceImpl implements ITCwCheckBatchDetailService
{
    @Autowired
    private TCwCheckBatchDetailMapper tCwCheckBatchDetailMapper;

    /**
     * 查询对账批次明细（保存对账结果明细的）
     * 
     * @param id 对账批次明细（保存对账结果明细的）ID
     * @return 对账批次明细（保存对账结果明细的）
     */
    @Override
    public TCwCheckBatchDetail selectTCwCheckBatchDetailById(Long id)
    {
        return tCwCheckBatchDetailMapper.selectTCwCheckBatchDetailById(id);
    }

    /**
     * 查询对账批次明细（保存对账结果明细的）列表
     * 
     * @param tCwCheckBatchDetail 对账批次明细（保存对账结果明细的）
     * @return 对账批次明细（保存对账结果明细的）
     */
    @Override
    public List<TCwCheckBatchDetail> selectTCwCheckBatchDetailList(TCwCheckBatchDetail tCwCheckBatchDetail)
    {
        return tCwCheckBatchDetailMapper.selectTCwCheckBatchDetailList(tCwCheckBatchDetail);
    }

    /**
     * 新增对账批次明细（保存对账结果明细的）
     * 
     * @param tCwCheckBatchDetail 对账批次明细（保存对账结果明细的）
     * @return 结果
     */
    @Override
    public int insertTCwCheckBatchDetail(TCwCheckBatchDetail tCwCheckBatchDetail)
    {
        tCwCheckBatchDetail.setCreateTime(DateUtils.getNowDate());
        return tCwCheckBatchDetailMapper.insertTCwCheckBatchDetail(tCwCheckBatchDetail);
    }

    /**
     * 修改对账批次明细（保存对账结果明细的）
     * 
     * @param tCwCheckBatchDetail 对账批次明细（保存对账结果明细的）
     * @return 结果
     */
    @Override
    public int updateTCwCheckBatchDetail(TCwCheckBatchDetail tCwCheckBatchDetail)
    {
        tCwCheckBatchDetail.setUpdateTime(DateUtils.getNowDate());
        return tCwCheckBatchDetailMapper.updateTCwCheckBatchDetail(tCwCheckBatchDetail);
    }

    /**
     * 批量删除对账批次明细（保存对账结果明细的）
     * 
     * @param ids 需要删除的对账批次明细（保存对账结果明细的）ID
     * @return 结果
     */
    @Override
    public int deleteTCwCheckBatchDetailByIds(Long[] ids)
    {
        return tCwCheckBatchDetailMapper.deleteTCwCheckBatchDetailByIds(ids);
    }

    /**
     * 删除对账批次明细（保存对账结果明细的）信息
     * 
     * @param id 对账批次明细（保存对账结果明细的）ID
     * @return 结果
     */
    @Override
    public int deleteTCwCheckBatchDetailById(Long id)
    {
        return tCwCheckBatchDetailMapper.deleteTCwCheckBatchDetailById(id);
    }
}
